<!doctype html>
<html>
<head>
  <style>
    div {
      color: red;
    }
    .foo {
      text-decoration: underline;
    }
    div.foo {
      font-style: italic;
    }
  </style>

  <script>
    window.expectedStyle = {
      '': {
        'div': { 'color': 'red' },
        '.foo': { 'text-decoration': 'underline' },
        'div.foo': { 'font-style': 'italic' }
      }
    };
  </script>
</head>
<body>
  <div>Hello</div>
  <section class="foo">Hi</section>
  <div class="foo">Greetings</div>
</body>
</html>
